// 放置全局指令
import Vue from 'vue'
import store from '@/store'

Vue.directive('checkBtn', {
  inserted(el, binding) {
    // const { value } = binding
    // const hasPermission = store.state.user.userInfo.roles.points.includes(value)
    // console.log(hasPermission)
    const poinet = store.state.user.userInfo.roles.points
    // if (!hasPermission) {
    //   // el.parentNode.removeChild(el)
    //   el.remove()
    // }
    if (!poinet.includes(binding.value)) {
      el.remove()
    }
  }
})
